package com.example.module_main.viewmodel

import androidx.lifecycle.MutableLiveData
import com.example.lib_base.base.BaseViewModel
import com.example.module_main.ApiService
import com.example.module_main.entity.HomeEntity
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class HomeViewModel @Inject constructor(
    val apiService: ApiService
): BaseViewModel() {
    val getSuccess by lazy {
        MutableLiveData<HomeEntity>()
    }
    fun getNotice(page:Int,size:Int){
        executeNetWorkT(
            {apiService.getNotices(page, size)},
            getSuccess::postValue
        )
    }
}